import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Scanner;

public class Main {
    public static List<List<Integer>> generate(int numRow){
        List<List<Integer>> ret = new ArrayList<>();
        //处理第一行
        List<Integer> list = new ArrayList<>();
        list.add(1);
        ret.add(list);
        for(int i = 1; i < numRow; i++){
            List<Integer> curRow = new ArrayList<>();
            curRow.add(1);//每行第一个元素
            List<Integer> preRow = ret.get(i - 1);
            for (int j = 1; j < i; j++) {
                int curVal = preRow.get(j - 1) + preRow.get(j);
                curRow.add(curVal);
            }
            curRow.add(1);//每一行最后一个元素
            ret.add(curRow);
        }
        return ret;
    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int rows=sc.nextInt();
        List<List<Integer>> triangle = generate(rows);
        Iterator<List<Integer>> iter = triangle.iterator();
        while(iter.hasNext()){
            System.out.println(iter.next()+" ");
        }

    }
}
